﻿using System;
using System.Collections.Generic;
using System.Text;
using Cloud.Model;
using System.Data.SqlClient;
using System.Data;

namespace Cloud.DAL
{
    public class OtherCodeService
    {
        private const string level_command = "select ROLES.SYSTEM_ID from USER_INFO  inner join ROLES on ROLES.ROLE_ID = USER_INFO.ROLE_ID where USER_INFO.USER_ID=@name and USER_INFO.PASSWORD = @pwd";

        public static String Level(String name, String pwd)
        {
            SqlParameter[] pars = new SqlParameter[]{
				new SqlParameter("@name",SqlDbType.VarChar),
				new SqlParameter("@pwd",SqlDbType.VarChar)
			};
            pars[0].Value = name;
            pars[1].Value = pwd;
            String a = Convert.ToString(DBHelper.ExecuteScalar(level_command, CommandType.Text, pars));
            return a;
        }

    }
}
